// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import Axios from 'axios'
import App from './App'
import router from './router'
import $ from 'jquery'
import { DatePicker } from 'element-ui'
import '../static/UE/ueditor.config.js'
import '../static/UE/ueditor.all.js'
import '../static/UE/lang/zh-cn/zh-cn.js'
import '../static/UE/ueditor.parse.js'
import qs from 'qs'

Vue.prototype.$http = Axios
Vue.config.productionTip = false
Vue.use( DatePicker )
//post请求设置数据
Axios.interceptors.request.use(function (config) {
		if (config.method === "post") {
			config.data = qs.stringify(config.data);
		}
    return config;
}, function (error) {
    return Promise.reject(error);
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})
